package com.audaque.springboot.foshanupload.web.flinkdemo.controller;

import com.audaque.springboot.foshanupload.web.flinkdemo.component.Consumer;
import com.audaque.springboot.foshanupload.web.flinkdemo.component.Producer;
import com.audaque.springboot.foshanupload.web.flinkdemo.service.inface.FlinkService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zgb
 * @desc ...
 * @date 2023-08-28 22:38:17
 */
@Slf4j
@RestController
@RequestMapping("/kafka")
public class KafkaController {


    @Autowired
    private Producer producer;

    @Autowired
    private Consumer consumer;


    @GetMapping("/producer")
    public void producer() throws Exception {
        producer.run();
    }
    @GetMapping("/consumer")
    public void consumer() throws Exception {
        consumer.run();
    }

}
